// Script assets have changed for v2.3.0 see
// https://help.yoyogames.com/hc/en-us/articles/360005277377 for more information
function scrSave(){
	var data = array_create(0);
 
   if instance_exists(o_Creature)
    {
        with o_Hero
        {
            var saveData =
            {
                obj : object_get_name(object_index),
                x : x,
                y : y,
				hp: hp,
				fw_level : fw_level,
				sw_level : sw_level,
				tw_level : tw_level,
				fw_spec :fw_spec,
				sw_spec : sw_spec,
				tw_spec : tw_spec,
				weapon_type1 : weapon_type3,
				weapon_type2 : weapon_type2,
				weapon_type3 : weapon_type3,
                visible : visible,
                image_index : image_index,
            }
            array_push(data, saveData)
        }
    }
 
 
    var _string = json_stringify(data);
    var _buffer = buffer_create(string_byte_length(_string) + 1, buffer_fixed, 1);
 
    buffer_write(_buffer, buffer_string, _string);
    buffer_save(_buffer, "Save_Game.save");
    buffer_delete(_buffer);
}